﻿<script type="text/template" id="function-form-template">
    <div id="function-form-error" class="error"></div>
    <form id="function-form" onsubmit="return false;">
        <input type="hidden" name="ParenId" id="ParenId" value="<%= model.ParenId %>" />
        <ul class="idata-form">
            <li>
                <span class="idata-form-title">
                    <%= jsResources.lang.ManageSystemMenu_Name %>    
                </span>
                <span>
                    <input type="text" name="Name" id="Name" required value="<%= model.Name %>"/>
                </span>
            </li> 
            <li>
                <span class="idata-form-title">
                    <%= jsResources.lang.ManageSystemMenu_Name %>    
                </span>
                <span>
                    <input type="text" name="ActionControllerName" id="ActionControllerName" required value="<%= model.ActionControllerName %>"/>
                </span>
                <span>
                    <a href="javascript:void(0)" class="btn-add-controller" ><%= jsResources.lang.ManageBookOfficeBtnChange %></a>                    
                </span>
            </li>            
            <li>
                <span class="idata-form-title">
                    <%= jsResources.lang.ManageSystemMenu_Description %>    
                </span>
                <span>
                    <textarea name="Description" id="Description"><%= model.Description %></textarea>
                </span>
            </li>
            <li>
                <span class="idata-form-title">
                    <%= jsResources.lang.ManageSystemMenu_IsActive %>    
                </span>
                <span>
                    <input type="checkbox" name = "IsActive" id="IsActive" <%= model.IsActive == true ? 'checked="checked"' : '' %> />
                </span>
            </li>
        </ul>
    </form>
</script>
<script type="text/template" id="list-function-template">
    
@{
    const string edit = " <a href=\"javascript:void(0)\" class=\"grid-update-function\"><%= jsResources.lang.GridEdit %></a> ";
    const string delete = "<a href=\"javascript:void(0)\" class=\"grid-delete-function\"><%= jsResources.lang.GridDelete %></a>";
}
    
    <td <%= model.IsRoot == true ? 'class="bold-class"' : '' %>>
        <%= model.Order %>
    </td>
    <td <%= model.IsRoot == true ? 'class="bold-class"' : '' %>>
        <%= model.Name %>
    </td>
    <td <%= model.IsRoot == true ? 'class="bold-class"' : '' %>>
        <%= model.ActionControllerName %>
    </td>
    <td>
       <input type="checkbox"  <%= model.IsActive == true ? 'checked="checked"' : '' %> name = "IsActive" class="cbxIsActive" />
    </td>
    <td>
    @{
        @Html.Raw(edit)  
    }
    </td>
    <td>
        @{
            @Html.Raw(delete)
        }             
    </td>
</script>